"""
表单模块
存储需要用到的所有的表
auth:@rqy,2021.6.1
"""
from django import forms


class SearchForm(forms.Form):   # 搜索
    search_name = forms.CharField(label='搜索一下')


class CreateUserForm(forms.Form):   # 创建账号
    username = forms.CharField(label='账号')
    email = forms.EmailField(label='邮箱')
    password = forms.CharField(label='密码', widget=forms.PasswordInput)

    SEX_CHOICES = (
        ('M', 'boy'),
        ('F', 'girl'),
    )
    sex = forms.ChoiceField(label='性别', choices=SEX_CHOICES, initial=1)
    address = forms.CharField(label='地址')


class CommentForm(forms.Form):  # 评论
    context = forms.CharField(label='评论', widget=forms.Textarea)

